﻿using System.Collections.Generic;
using System.Threading.Tasks;
using ChildPhotosManager.Core.Entities;
using ChildPhotosManager.Core.Dtos;
using Microsoft.AspNetCore.Http;

namespace ChildPhotosManager.Core.Services;

public interface IPhotoService
{
    // 上传照片
    Task<Photo> UploadPhotoAsync(IFormFile file, string? description, string? category);

    // 获取单张照片
    Task<Photo?> GetPhotoByIdAsync(int id);

    // 获取所有照片（支持分类筛选）
    Task<IEnumerable<PhotoViewModel>> GetAllPhotosAsync(string? category = null);

    // 获取所有分类
    Task<IEnumerable<string>> GetAllCategoriesAsync();

    // 新增：修改照片
    Task<Photo> UpdatePhotoAsync(int id, string? description, string? category);

    // 新增：删除照片
    Task DeletePhotoAsync(int id);

    // 新增：分页查询照片
    Task<PagedResult<PhotoViewModel>> GetPhotosByPageAsync(
        int pageNumber = 1,
        int pageSize = 4,
        string? category = null
    );
}